<template>
  <div id="app">
    <BasicLayout />
  </div>
</template>

<script setup lang="ts">
import BasicLayout from "@/layouts/BasicLayout.vue";
import { onMounted } from "vue";
import { useLoginUserStore } from "@/store/userStore";

const userStore = useLoginUserStore();

// 在应用加载时验证用户登录状态
onMounted(async () => {
  // 验证当前登录状态，如果无效会自动清除过期的用户信息
  await userStore.validateLoginStatus();
});
</script>
